/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @author: jin Chen 
 * @date: Nov 22, 2005$
 * @version: 1.0
 */
package edu.psu.geovista.app.gmatrix.event;

import java.awt.*;
import java.util.Set;

public class MatrixSelectionEvent extends java.util.EventObject {
    /*public static final int SELECT_CELL=1;//in this case, listener should check getSelection()
    public static final int SELECT_ROW=2;   //selectarray means rows
    public static final int SELECT_COL=3;   // selectarray means columns
    public static final int ADD_ROW=4;
    public static final int REMOVE_ROW=5;
    public static final int ADD_COL=6;
    public static final int REMOVE_COL=7;*/

    Set<Point> selection;  // 
    //int selecttype=SELECT_CELL;//one of the static values
    //int[] selectarray;// each element is a row or column index. Whether row/column depend on selecttype.
    int[] selectrows=new int[0];
    int[] selectcols=new int[0];
    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */
    public MatrixSelectionEvent(Object source) {
        super(source);
    }

    public MatrixSelectionEvent(Object source, Set<Point> selection) {
        super(source);
        this.selection = selection;
    }

    /*public MatrixSelectionEvent(Object source, int selecttype) {
        super(source);
        //this.selectarray = selectarray;
        this.selecttype = selecttype;
    }*/

    public Set<Point> getSelection() {
        return selection;
    }

    /*public int[] getSelectarray() {
        return selectarray;
    }

    public void setSelectarray(int[] selectarray) {
        this.selectarray = selectarray;
    }*/

   /* public int getSelecttype() {
        return selecttype;
    }

    public void setSelecttype(int selecttype) {
        this.selecttype = selecttype;
    }*/

    public int[] getSelectcols() {
        return selectcols;
    }

    public void setSelectcols(int[] selectcols) {
        this.selectcols = selectcols;
    }

    public int[] getSelectrows() {
        return selectrows;
    }

    public void setSelectrows(int[] selectrows) {
        this.selectrows = selectrows;
    }
}
